Skip to content

[otap-dataflow] add transport header infrastructure#2539

Merged
lquerel merged 12 commits intoopen-telemetry:mainfrom
c1ly:support-headers-context
Apr 7, 2026
Merged

[otap-dataflow] add transport header infrastructure#2539
lquerel merged 12 commits intoopen-telemetry:mainfrom
c1ly:support-headers-context

Conversation

@c1ly
Copy link
Copy Markdown
Contributor

@c1ly c1ly commented Apr 4, 2026

Change Summary

Update the OtapPdata Context with the transport_headers field, so that OtapPdata can carry the headers through the pipeline.

Defined the TransportHeadersPolicy with HeaderCapturePolicy and HeaderPropagationPolicy, update the Policies to have a transport_headers field. Receiver and Exporter nodes can also define HeaderCapturePolicy and HeaderPropagationPolicy respectively, these definitions will override any top level HeaderCapturePolicy and HeaderPropagationPolicy rules.

Exposed the policy to the Receiver and Exporter nodes via the EffectHandler with helper functions that apply the policies on a iterator of key value pairs (for receiver nodes) and transport_headers (for exporter nodes)

What issue does this PR close?

How are these changes tested?

unit tests and integration tests

Are there any user-facing changes?

no

…des and propagating headers in exporter nodes. Exposed helper capture and propagation tools in the effect_handler for receiver and exporter nodes to use
@c1ly c1ly requested a review from a team as a code owner April 4, 2026 01:54
@github-actions github-actions bot added the rust Pull requests that update Rust code label Apr 4, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

❌ Patch coverage is 96.27286% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.40%. Comparing base (32bc2ca) to head (0be7d39).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2539      +/-   ##
==========================================
+ Coverage   88.36%   88.40%   +0.03%     
==========================================
  Files         615      618       +3     
  Lines      223313   224729    +1416     
==========================================
+ Hits       197330   198671    +1341     
- Misses      25459    25534      +75     
  Partials      524      524              
Components Coverage Δ
otap-dataflow 90.29% <96.27%> (+0.03%) ⬆️
query_abstraction 80.61% <ø> (ø)
query_engine 90.74% <ø> (ø)
syslog_cef_receivers ∅ <ø> (∅)
otel-arrow-go 52.45% <ø> (ø)
quiver 91.92% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor things to fix/improve and I think we are ready to go,

Copy link
Copy Markdown
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for these changes.

@lquerel lquerel enabled auto-merge April 6, 2026 23:57
@lquerel lquerel added this pull request to the merge queue Apr 7, 2026
Merged via the queue into open-telemetry:main with commit 962ac30 Apr 7, 2026
68 of 69 checks passed
/// is valid in both HTTP and gRPC metadata.
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct TransportHeaders {
headers: Vec<TransportHeader>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was somehow expecting to see an Rc<> or Arc<> here so that cloning a context does not clone the vector of headers. (Discussion topic.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this one. Thank you
@Chanly could you create a follow up PR to improve the cloning. Thanks

Copy link
Copy Markdown
Contributor Author

@c1ly c1ly Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this pr should fix it #2584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support policy-based transport header extraction and propagation in OtapPdata

4 participants